import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MyMusicController } from './my-music.controller';
import { MyMusicService } from './my-music.service';
import { UserSong } from './my-music.entity';
import { SongModule } from '../song/song.module';
import { Song } from '../song/song.entity';
import { Playlist } from '../playlist/playlist.entity';
import { PlaylistModule } from '../playlist/playlist.module';
import { UserModule } from '../user/user.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([UserSong, Song, Playlist]),
    forwardRef(() => SongModule),
    PlaylistModule,
    UserModule,
  ],
  controllers: [MyMusicController],
  providers: [MyMusicService],
  exports: [MyMusicService],
})
export class MyMusicModule {}
